package vn.vfriends.id.service.impl;

import java.util.List;
import javax.inject.Inject;
import vn.vfriends.id.jpa.controller.UserJpaController;
import vn.vfriends.id.jpa.entity.User;
import vn.vfriends.id.service.UserService;

/**
 *
 * @author tuan@vfriends.vn
 */
public class UserServiceImpl implements UserService {

    @Inject private UserJpaController userController;
    
    @Override
    public void create(User user) throws Exception {
        userController.create(user);
    }

    @Override
    public void edit(User user) throws Exception {
        userController.edit(user);
    }

    @Override
    public void destroy(Long id) throws Exception {
        userController.destroy(id);
    }

    @Override
    public List<User> find() {
        return userController.find();
    }

    @Override
    public List<User> find(int maxResults, int firstResult) {
        return userController.find(maxResults, firstResult);
    }

    @Override
    public User find(Long id) {
        return userController.find(id);
    }

    @Override
    public User findByUsername(String username) {
        return userController.findByUsername(username);
    }

    @Override
    public User findByEmail(String email) {
        return userController.findByEmail(email);
    }

    @Override
    public User findByVerificationKey(String key) {
        return userController.findByVerificationKey(key);
    }

    @Override
    public int getCount() {
        return userController.getCount();
    }

}
